package com.victualler.core.config.menu.repository;

import com.victualler.core.base.repository.BaseRepository;
import com.victualler.core.config.menu.entity.MenuDao;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: Guoshichang
 * @discription: 
 */
@Repository
public interface MenuRepository extends BaseRepository<MenuDao,Long> {
    /**
     * @author Guoshichang
     * @since 19:52 on 2018/8/28.
     * @param name 菜单名称
     * @return List
     * @Function  根据菜单名称模糊查询菜单
     */
    @Query("select p from MenuDao p where p.name like :name")
    public List<MenuDao> getByName(@Param("name") String name);
}
